<template>
	<view class="container">
		<uni-section title="案件信息" type="line"></uni-section>
		<case-detail :selectedCase="selectedCase"></case-detail>
	</view>
</template>

<script>
	import { getCaseDetail } from '@/api/dums/caw/caseInfo.js'
	export default {
		data() {
			return {
				caseId:"",
				selectedCase:{},//案件详情
			}
		},
		methods: {
			getDetailInfo(){
				getCaseDetail({caseId:this.caseId}).then(res =>{
					console.log(res.data.linkName);
					console.log(res.data.runId);
					if(res.code == 200){
						this.selectedCase = res.data;
						this.caseForm = Object.assign({},this.selectedCase);
					}
				})
			},
		},
		onLoad(options) {
			this.caseId = options.caseId;
			//获取事件信息
			this.getDetailInfo();
		},
		onNavigationBarButtonTap : function (e) {
			//console.log(this.caseId);
			if(e.index == 0){//附件
				uni.navigateTo({
					url:'../case-attach/case-attach?caseId='+this.caseId
				})
			}else{//办理进度
				uni.navigateTo({
					url:'../case-process/case-process?caseId='+this.caseId
				})
			}
		},
	}
</script>

<style>

</style>
